//
//  ZHButton.m
//  baidunuomi
//
//  Created by wangzhaohui-Mac on 14-8-11.
//  Copyright (c) 2014年 com.ZH. All rights reserved.
//

#import "WKButton.h"

@implementation WKButton

+ (instancetype)menuButton
{
    return [[self alloc] init];
}


- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.showsTouchWhenHighlighted = YES;
        self.titleLabel.font = [UIFont systemFontOfSize:12];
        //按钮标题显示模式
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat titleX = 0;
    CGFloat titleY = self.height - 10;
    CGFloat titleW = self.width;
    CGFloat titlelH = 10;
    
    self.titleLabel.frame = CGRectMake(titleX, titleY, titleW, titlelH);
}


@end
